import Vue from 'vue'
import Router from 'vue-router'
import ListPape from '../components/wap/ListPape'
import Details from '../components/wap/Details'
import Register from '../components/wap/Register'


Vue.use(Router)

let souce = /Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent) ? "vp" :  "pc";
let indexPape = souce === 'vp' ? ListPape :  null //PC组件待开发

export default new Router({
  routes: [
    {
      path: '/',
      name: indexPape,
      component: indexPape
    },
    {
      path: '/Details/:id',
      name: Details,
      component: Details
    },
    {
      path: '/Register',
      name: Register,
      component: Register
    },
    {
	  path:'*',
	  component:ListPape
    }
  ]
})
